<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:61:"D:\phpstudy_pro\demo/application/home\view\filepage\file.html";i:1613304858;s:68:"D:\phpstudy_pro\demo\application\home\view\filepage\base\header.html";i:1613304858;s:68:"D:\phpstudy_pro\demo\application\home\view\filepage\base\footer.html";i:1612008989;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->

    <link href="/public/static/home/css/datepicker3.css" rel="stylesheet">
    <link href="/public/static/home/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/static/home/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/home/css/animate.min.css" rel="stylesheet">
    <link href="/public/static/home/css/style.min.css?v=4.0.0" rel="stylesheet">
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="file-manager">
                        <h5>显示：</h5>
                        <a href="file_manager.html#" class="file-control active">所有</a>
                        <a href="file_manager.html#" class="file-control">文档</a>
                        <a href="file_manager.html#" class="file-control">视频</a>
                        <a href="file_manager.html#" class="file-control">图片</a>
                        <div class="hr-line-dashed"></div>
                        <form action="file.html?dir=<?php echo $dir; ?>" method="post">
                            <input type="text" class="form-control" name="floder">
                            <span class="help-block m-b-none">请不要包含特殊符号和中文 </span>
                            <button class="btn btn-primary btn-block">创建文件夹</button>
                        </form>
                        <button class="btn btn-info btn-block" id="upload">上传文件</button>
                        <div class="hr-line-dashed"></div>
                        <h5>文件夹</h5>
                        <ul class="folder-list" style="padding: 0">
                            <!--                            文件夹-->
                            <?php if ($upper != ''): ?>
                                <li><a href="file.html?dir=<?php echo $upper; ?>"><i class="fa fa-folder"></i>上一级文件夹</a>
                                </li>
                            <?php endif;
                            if (is_array($floder) || $floder instanceof \think\Collection || $floder instanceof \think\Paginator): $i = 0;
                                $__LIST__ = $floder;
                                if (count($__LIST__) == 0) : echo ""; else: foreach ($__LIST__ as $key => $floder): $mod = ($i % 2);
                                    ++$i; ?>
                                    <li><a href="file.html?dir=<?php echo $floder['url']; ?>"><i
                                                    class="fa fa-folder"></i><?php echo $floder['name']; ?></a>
                                    </li>
                                <?php endforeach; endif; else: echo "";endif; ?>
                            <!--                            -->
                        </ul>
                        <?php if ($desc): ?>
                            <h5 class="tag-title">标签</h5>
                            <ul class="tag-list" style="padding: 0">
                                <!--                            标签--><?php if ($desc != ''): ?>
                                    <li><a href="file_manager.html"><?php echo $desc; ?></a>
                                    </li>
                                <?php else: ?>
                                    <li><a href="file_manager.html">无</a>
                                    </li>
                                <?php endif; ?>
                                <!--                            -->
                            </ul>
                        <?php endif; ?>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-9 animated fadeInRight">
            <div class="row">
                <div class="col-sm-12">
                    <?php if (is_array($file) || $file instanceof \think\Collection || $file instanceof \think\Paginator): $i = 0;
                        $__LIST__ = $file;
                        if (count($__LIST__) == 0) : echo ""; else: foreach ($__LIST__ as $key => $file): $mod = ($i % 2);
                            ++$i; ?>
                            <div class="file-box">
                                <a href="<?php echo $domain; ?>/<?php echo $file['url']; ?><?php echo $file['name']; ?>">
                                    <div class="file">
                                        <span class="corner"></span>
                                        <?php switch ($file['type']): case "gif":
                                            case "png":
                                            case "jpeg":
                                            case "jpg":
                                            case "bmp": ?>
                                                <div class="image">
                                                    <img alt="image" class="img-responsive"
                                                         src="<?php echo $domain; ?>/<?php echo $file['url']; ?><?php echo $file['name']; ?>">
                                                </div>
                                                <?php break;
                                            case "xlsx":
                                            case "xls": ?>
                                                <div class="icon">
                                                    <i class="fa fa-bar-chart-o"></i>
                                                </div>
                                                <?php break;
                                            case "ppt":
                                            case "pptx": ?>
                                                <div class="icon">
                                                    <i class="fa fa-file-powerpoint-o"></i>
                                                </div>
                                                <?php break;
                                            case "doc":
                                            case "docx": ?>
                                                <div class="icon">
                                                    <i class="fa fa-file-word-o"></i>
                                                </div>
                                                <?php break;
                                            case "c":
                                            case "cpp":
                                            case "py":
                                            case "css":
                                            case "js":
                                            case "java":
                                            case "html": ?>
                                                <div class="icon">
                                                    <i class="fa fa-file-code-o"></i>
                                                </div>
                                                <?php break;
                                            case "txt":
                                            case "pdf":
                                            case "mobi":
                                            case "equb": ?>
                                                <div class="icon">
                                                    <i class="fa fa-book"></i>
                                                </div>
                                                <?php break;
                                            case "sql":
                                            case "db": ?>
                                                <div class="icon">
                                                    <i class="fa fa-database"></i>
                                                </div>
                                                <?php break;
                                            case "mp4":
                                            case "avi":
                                            case "wmv":
                                            case "rmvb":
                                            case "rm": ?>
                                                <div class="icon">
                                                    <i class="fa fa-film"></i>
                                                </div>
                                                <?php break;
                                            case "zip":
                                            case "rar":
                                            case "7z":
                                            case "gar":
                                            case "gz":
                                            case "tar": ?>
                                                <div class="icon">
                                                    <i class="fa fa-file-zip-o"></i>
                                                </div>
                                                <?php break;
                                            case "mp3":
                                            case "midi":
                                            case "wma":
                                            case "flav": ?>
                                                <div class="icon">
                                                    <i class="fa fa-music"></i>
                                                </div>
                                                <?php break;
                                            default: ?>
                                                <div class="icon">
                                                    <i class="fa fa-file"></i>
                                                </div>
                                            <?php endswitch; ?>
                                        <!--                                <div class="icon">-->
                                        <!--                                    <i class="fa fa-bar-chart-o"></i>-->
                                        <!--                                </div>-->
                                        <div class="file-name">
                                            <?php echo $file['name']; ?>
                                            <br/>
                                            <small>添加时间：<?php echo $file['creat_time']; ?></small>
                                        </div>
                                    </div>
                                </a>
                            </div>
                        <?php endforeach; endif; else: echo "";endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>
</body>


<script type="text/javascript">
    var BASE_URL = '/public/static/home/js/plugins/webuploader';
</script>
<script src="/public/static/home/js/jquery.min.js?v=2.1.4"></script>
<script src="/public/static/home/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/public/static/home/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/public/static/home/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/public/static/home/js/plugins/layer/layer.min.js"></script>
<script src="/public/static/home/js/hplus.min.js?v=4.0.0"></script>
<script type="text/javascript" src="/public/static/home/js/contabs.min.js"></script>
<script src="/public/static/home/js/plugins/pace/pace.min.js"></script>
<script src="/public/static/home/js/layui/layui.all.js"></script>
<script>
    var $upload = $('#upload');
    $upload.on('click', function () {
        layer.open({
            type: 2,
            title: '上传文件到当前文件夹',
            shadeClose: false,
            shade: 0.8,
            area: ['90%', '90%'],
            content: 'upload_file.html',
            end: function () {
                location.reload();
            }
        })
    });
</script>
